import { postRequest, getRequest } from '@/utils/request.js';

/**
 * @Description: 个人中心
 * @Author: linmei
 */
export const userApi = {
  // 用户积分列表
  userPointList: (param) => {
    return getRequest('/events/user_points_records/page', param);
  },
  userPointTotal: () => {
    return getRequest('/events/user_points_records/user/point');
  },
  // 用户参与的活动列表
  userActivityList: (param) => {
    return getRequest('/events/user_join_activity/page', param);
  },
  // 获取用户个人信息
  getUserInfo: () => {
    return getRequest('/member/user/getLoginMemberInfo');
  },
  // 部门
  getDeptInfo: (id) => {
    return getRequest('/member/dept/' + id);
  },
  // 组织
  getOrgList: () => {
    return getRequest('/sys/org/list');
  },
  // 健步走活动获取可参与的组织范围
  getJoinOrgList: (id) => {
    return getRequest('/events/activity_brisk_walk/get/join/org/' + id);
  },
};